package com.cxs.idldemo;

import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.rpc.IRemoteObject;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;
import ohos.rpc.RemoteException;

public class ServiceAbility extends Ability {
    private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD001100, "Demo");

    RemoteAgentStub remoteAgentStub = new RemoteAgentStub("service") {
        @Override
        public int plus(int numA, int numB) throws RemoteException {
            return numA + numB;
        }
    };

    @Override
    public IRemoteObject onConnect(Intent intent) {
        return remoteAgentStub.asObject();
    }
}